Skip to content

Add account balance, mark-to-market loss limits and fail-fast run cutoff; codebase hardening from code review #46

Merged
mccaffers merged 1 commit into
mainfrom
45-add-account-balance-mark-to-market-loss-limits-and-fail-fast-run-cutoff-codebase-hardening-from-code-review
Jun 9, 2026
Merged

Add account balance, mark-to-market loss limits and fail-fast run cutoff; codebase hardening from code review #46
mccaffers merged 1 commit into
mainfrom
45-add-account-balance-mark-to-market-loss-limits-and-fail-fast-run-cutoff-codebase-hardening-from-code-review

Conversation

@mccaffers

@mccaffers mccaffers commented Jun 9, 2026

Copy link
Copy Markdown
Owner
  • JSON parse errors no longer swallowed: parse failures propagate with byte-offset detail instead of continuing into a misleading downstream exception; leftover debug prints removed.
  • Thread-safety: timestamp-parse date cache moved from function-local statics to caller-owned state (safe if tick loading moves onto the thread pool); unchecked from_chars price parses now throw instead of producing garbage values (also covers NULL DB columns).
  • Dead code removed: scaffolding files (serviceA, configManager, empty trade.cpp), unused base64/timestamp utilities (one with a ms/µs conversion bug), printResults; Xcode project references scrubbed.
  • Build fixes: main.cpp no longer compiled into both the static lib and the executable; macOS-only xcrun guarded by if(APPLE); libomp located via brew --prefix (fixes Intel Macs); duplicate find_package(OpenMP) removed; global include_directories converted to target-scoped.
  • Minor: redundant PnL recomputation in Reporting::collect removed; unnecessary heap allocation of TradeManager replaced with a stack local.

…t the canonical symbol_scale table before query interpolation; unknown symbols are rejected with a clear error.

  - JSON parse errors no longer swallowed: parse failures propagate with byte-offset detail instead of continuing into a misleading downstream exception; leftover debug prints removed.
  - Thread-safety: timestamp-parse date cache moved from function-local statics to caller-owned state (safe if tick loading moves onto the thread pool); unchecked from_chars price parses now throw instead of producing garbage values (also covers NULL DB columns).
  - Dead code removed: scaffolding files (serviceA, configManager, empty trade.cpp), unused base64/timestamp utilities (one with a ms/µs conversion bug), printResults; Xcode project references scrubbed.
  - Build fixes: main.cpp no longer compiled into both the static lib and the executable; macOS-only xcrun guarded by if(APPLE); libomp located via brew --prefix (fixes Intel Macs); duplicate find_package(OpenMP) removed; global include_directories converted to target-scoped.
  - Minor: redundant PnL recomputation in Reporting::collect removed; unnecessary heap allocation of TradeManager replaced with a stack local.
@mccaffers mccaffers self-assigned this Jun 9, 2026
@mccaffers mccaffers changed the title - SQL injection fix: symbols from Redis payloads are validated agains… Add account balance, mark-to-market loss limits and fail-fast run cutoff; codebase hardening from code review Jun 9, 2026
@mccaffers mccaffers added enhancement New feature or request cpp labels Jun 9, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
48.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@mccaffers mccaffers marked this pull request as ready for review June 9, 2026 21:10
@mccaffers mccaffers merged commit 0b05da3 into main Jun 9, 2026
3 of 4 checks passed
@mccaffers mccaffers deleted the 45-add-account-balance-mark-to-market-loss-limits-and-fail-fast-run-cutoff-codebase-hardening-from-code-review branch June 9, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cpp enhancement New feature or request

Projects

Development

Successfully merging this pull request may close these issues.

Add account balance, mark-to-market loss limits and fail-fast run cutoff; codebase hardening from code review

1 participant